home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / SNIP0492.ARJ / INT2E.ASM < prev    next >
Assembly Source File  |  1991-09-12  |  1KB  |  49 lines

  1.         PAGE    55,132
  2.         .LIST
  3. ;
  4. ;       Interrupt 2Eh Call
  5. ;
  6. ;               From information originally published in
  7. ;               PC magazine, April 28, 1987. Requires
  8. ;               MASM 5.1 or later.
  9. ;
  10. ;               Adapted by Bob Stout.
  11. ;
  12. ;       NOTES:  INT 2Eh passes a formatted command line
  13. ;               directly to the resident portion of
  14. ;               COMMAND.COM for execution. It functions
  15. ;               similarly to the 'EXEC' function in DOS
  16. ;               but is generally quicker. This is an
  17. ;               undocumented DOS function and is subject
  18. ;               to change in future releases of DOS. It
  19. ;               also aborts any .BAT file which invokes
  20. ;               a program which uses it. Use with care!
  21. ;
  22.  
  23. %       .MODEL  memodel,C               ;Add model support via
  24.                                         ;command line macros, e.g.
  25.                                         ;MASM /Mx /Dmemodel=LARGE
  26.  
  27.         .CODE
  28.  
  29.         PUBLIC  _Int_2E
  30.  
  31. _Int_2E PROC    USES SI DI DS ES, command:PTR
  32.         Mov     CS:SaveSP,SP
  33.         Mov     CS:SaveSS,SS
  34.         Mov     SI,command
  35.  
  36.         Int     2Eh
  37.  
  38.         Mov     AX,CS:SaveSS
  39.         Mov     SS,AX
  40.         Mov     SP,CS:SaveSP
  41.         Ret
  42.  
  43. SaveSS  Dw      ?
  44. SaveSP  Dw      ?
  45.  
  46. _Int_2E ENDP
  47.  
  48.         End
  49.